<template>
  <view>
    <u-navbar title="业绩申请详情"></u-navbar>
    <view class="top" :style="perInfo.auditStatus == 1 ? `#FEF4F4` : `background-color: #F1F8FF;`">
      <view v-if="perInfo.auditStatus == 1" class="top-title"> 已通过 </view>
      <view v-else-if="perInfo.auditStatus == 0" class="top-title"> 待审核 </view>
      <view v-else class="top-title"> 已驳回 </view>
      <p>申请时间：{{ createTime(perInfo.createTime) }}</p>
    </view>
    <view class="content">
      <view class="title"> 申请原因 </view>
      <view class="content-item">
        {{ perInfo.applyReason }}
      </view>
      <view class="">
        <view class="title"> 相关证明: </view>
        <view class="content-img">
          <image
            v-for="(item, index) in perInfo.applyPicUrls"
            :key="index"
            class="img-item"
            :src="item"
            mode=""
          ></image>
        </view>
      </view>
    </view>
    <view class="floor">
      <view class="">
        <view class="title"> 客户信息 </view>
        <view class=""> 客户姓名：{{ perInfo.customerName }} </view>
        <view class=""> 联系方式：{{ perInfo.customerMobile }} </view>
        <view class=""> 客户地址：{{ perInfo.detailAddress }} </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      status: 1,
      perInfo: {}
    }
  },
  onLoad(e) {
    this.$u.get('/app-api/trade/brokerage-achievement/get').then((res) => {
      this.perInfo = res.data
    })
  },
  computed: {
    createTime() {
      return (e) => this.$utils.parseTime(e)
    }
  },
  methods: {}
}
</script>

<style>
page {
  background-color: #f2f2f2;
}
.top {
  line-height: 55rpx;
  padding: 20rpx;
  background-color: #fff;
}
.top-title {
  color: #0f76bb;
  font-size: 30rpx;
}

.top p {
  font-size: 26rpx;
}

.content {
  line-height: 55rpx;
  padding: 20rpx;
  margin-bottom: 20rpx;
  background-color: #fff;
}
.floor {
  background-color: #fff;
  line-height: 60rpx;
  padding: 20rpx;
}
.title {
  font-size: 30rpx;
  font-weight: 600;
}
.img-item {
  width: 160rpx;
  height: 160rpx;
  margin-right: 10rpx;
}
</style>
